VERSION 5.00
Begin VB.Form CleanupForm 
   Appearance      =   0  'Flat
   AutoRedraw      =   -1  'True
   BackColor       =   &H80000005&
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   9000
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   12000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   9000
   ScaleWidth      =   12000
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   WindowState     =   2  'Maximized
   Begin VB.CommandButton Cancel_Button 
      Caption         =   "Done"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   8760
      TabIndex        =   8
      Top             =   7080
      Width           =   1935
   End
   Begin VB.CommandButton DeleteLabTechButton 
      Caption         =   "Delete"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   8760
      TabIndex        =   2
      Top             =   5220
      Width           =   1935
   End
   Begin VB.CommandButton DeleteCounselorButton 
      Caption         =   "Delete"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   8760
      TabIndex        =   1
      Top             =   3900
      Width           =   1935
   End
   Begin VB.CommandButton DeleteClerkButton 
      Caption         =   "Delete"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   8760
      TabIndex        =   0
      Top             =   2580
      Width           =   1935
   End
   Begin VB.Label CounselorCountLabel 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "The number of counselors with this code ="
      BeginProperty Font 
         Name            =   "Abadi MT Condensed Light"
         Size            =   20.25
         Charset         =   0
         Weight          =   300
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   840
      TabIndex        =   7
      Top             =   1560
      Width           =   8475
   End
   Begin VB.Label CounselorCodeLabel 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "The correcponding counselor code for 940601 is "
      BeginProperty Font 
         Name            =   "Abadi MT Condensed Light"
         Size            =   20.25
         Charset         =   0
         Weight          =   300
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   840
      TabIndex        =   6
      Top             =   900
      Width           =   8475
   End
   Begin VB.Label LabTechLabel 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Records with a Lab Technician code of 940601 = "
      BeginProperty Font 
         Name            =   "Abadi MT Condensed Light"
         Size            =   20.25
         Charset         =   0
         Weight          =   300
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   780
      TabIndex        =   5
      Top             =   5400
      Width           =   7995
   End
   Begin VB.Label CounselorLabel 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Records with a counselor code of"
      BeginProperty Font 
         Name            =   "Abadi MT Condensed Light"
         Size            =   20.25
         Charset         =   0
         Weight          =   300
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   780
      TabIndex        =   4
      Top             =   4140
      Width           =   7995
   End
   Begin VB.Label ClerkLabel 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Records with a  Clerk Code of 940601 = "
      BeginProperty Font 
         Name            =   "Abadi MT Condensed Light"
         Size            =   20.25
         Charset         =   0
         Weight          =   300
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   780
      TabIndex        =   3
      Top             =   2820
      Width           =   7995
   End
End
Attribute VB_Name = "CleanupForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim CCodeLookup As String
Dim CounCount As Integer
Dim ClrkRecs As Integer
Dim CounRecs As Integer
Dim LabRecs As Integer

Private Sub Cancel_Button_Click()
   VCTStageForm.Show
   Unload Me
End Sub

Private Sub DeleteClerkButton_Click()
   CnUser.Open ConnectString
   Cmd.CommandText = "DELETE FROM client WHERE CLRKCODE = '940601'"
   Cmd.CommandType = adCmdText
   Cmd.ActiveConnection = CnUser
   Cmd.Execute
   CnUser.Close
   Form_Load
End Sub

Private Sub DeleteCounselorButton_Click()
   CnUser.Open ConnectString
   Cmd.CommandText = "DELETE FROM client WHERE COUNCODE = '" & TrimAll(CCodeLookup) & "'"
   Cmd.CommandType = adCmdText
   Cmd.ActiveConnection = CnUser
   Cmd.Execute
   CnUser.Close
   Form_Load
End Sub

Private Sub DeleteLabTechButton_Click()
   CnUser.Open ConnectString
   Cmd.CommandText = "DELETE FROM client WHERE LABTECH = '940601'"
   Cmd.CommandType = adCmdText
   Cmd.ActiveConnection = CnUser
   Cmd.Execute
   CnUser.Close
   Form_Load
End Sub

Private Sub Form_Load()
   Dim rst As Integer
   
   CnUser.Open ConnectString
   Cmd.CommandText = "SELECT COUN_CODE" _
                  & " FROM   counselor" _
                  & " WHERE  COUN_PWD = '940601'"
   Cmd.ActiveConnection = CnUser
   Cmd.CommandType = adCmdText
   RsUser.Open Cmd, , adOpenStatic
   CCodeLookup = RsUser(0)
   RsUser.Close
   CnUser.Close
   CounselorCodeLabel.Caption = "The correcponding counselor code for 940601 is " & CCodeLookup
     
   'Get the number of counselors with the same code (shoudl be just 1)
   CnUser.Open ConnectString
   Cmd.CommandText = "SELECT COUNT(*)" _
                  & " FROM   counselor" _
                  & " WHERE  COUN_CODE = '" & TrimAll(CCodeLookup) & "'"
   Cmd.ActiveConnection = CnUser
   Cmd.CommandType = adCmdText
   RsUser.Open Cmd, , adOpenStatic
   CounCount = RsUser(0)
   RsUser.Close
   CnUser.Close
   CounselorCountLabel.Caption = "The number of counselors with this code = " & CounCount
   
   'Get the number of record with a clerk code of 940601
   CnUser.Open ConnectString
   Cmd.CommandText = "SELECT COUNT(*)" _
                  & " FROM   client" _
                  & " WHERE  CLRKCODE = '940601'"
   Cmd.ActiveConnection = CnUser
   Cmd.CommandType = adCmdText
   RsUser.Open Cmd, , adOpenStatic
   ClrkRecs = RsUser(0)
   RsUser.Close
   CnUser.Close
   ClerkLabel.Caption = "Records with a Clerk Code of 940601 = " & ClrkRecs
   
   'Get the number of record with a counselor code for 940601
   CnUser.Open ConnectString
   Cmd.CommandText = "SELECT COUNT(*)" _
                  & " FROM   client" _
                  & " WHERE  CounCOde = '" & TrimAll(CCodeLookup) & "'"
   Cmd.ActiveConnection = CnUser
   Cmd.CommandType = adCmdText
   RsUser.Open Cmd, , adOpenStatic
   CounRecs = RsUser(0)
   RsUser.Close
   CnUser.Close
   CounselorLabel.Caption = "Records with a Counselor Code of " & CCodeLookup & " = " & CounRecs
   
   'Get the number of record with a lab technician code of 940601
   CnUser.Open ConnectString
   Cmd.CommandText = "SELECT COUNT(*)" _
                  & " FROM   client" _
                  & " WHERE  LABTECH = '940601'"
   Cmd.ActiveConnection = CnUser
   Cmd.CommandType = adCmdText
   RsUser.Open Cmd, , adOpenStatic
   LabRecs = RsUser(0)
   RsUser.Close
   CnUser.Close
   LabTechLabel.Caption = "Records with a  Lab Technician Code of 940601 = " & LabRecs

End Sub

